/******************************************************************************

 ******************************************************************************
  File Name	:ptz.h
  Version		:001
  Author		:liangH
  Description	:define ptz class
  History		:20121112 new
  Modification	: 

******************************************************************************/
#ifndef __PTZ_H__
#define __PTZ_H__

#include "config.h"

class PTZ{

	/*variable*/
	public: 
		unsigned char protocol_type[4];/*protocol type, 1 shows PELCO-D, 2 shows PELCO-P, and 3 shows PELCO-B*/
		unsigned char ptz_switch[4];/*switch of ptz, 0 shows that ptz is closed, 1 shows that ptz is opened*/
		unsigned char boud_rate[4];/*the boud rate, 1 shows 4800, 2 shows 9600 and 3 shows 19200*/
		unsigned char wiper_switch[4];/*the switch of wiper, 0 shows that wiper is closed, 1 shows that wiper is opened*/

		pthread_mutex_t read_write_lock;/*read and write lock*/
	/*constructed function and deconstructed function*/
	public:
		PTZ();/*constructed function*/
		~PTZ();/*deconstructed function*/
		
	/*inside process function*/
	private:
	/*inside process function end*/
			
	public:
		/*set,get member functin*/
		void set_protocol_type(unsigned char channelID, unsigned char temp_protocol_type);
		unsigned char get_protocol_type(unsigned char channelID);
		void set_ptz_switch(unsigned char channelID, unsigned char temp_ptz_switch);
		unsigned char get_ptz_switch(unsigned char channelID);
		void set_wiper_switch(unsigned char channelID, unsigned char temp_wiper_switch);
		unsigned char get_wiper_switch(unsigned char channelID);
		void set_boud_rate(unsigned char channelID, unsigned char temp_boud_rate);
		unsigned char get_boud_rate(unsigned char channelID);
		/*set,get member functin end*/

		/*basic function*/
		/*basic function end*/
};

#endif

